package properties;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesDemo {
    public static void main(String[] args) throws IOException {
        Properties pro = new Properties();

        InputStream rs = PropertiesDemo.class.getClassLoader()
                .getResourceAsStream("pro.properties");

        pro.load(rs);

        String username = pro.getProperty("username");
        System.out.println(username);
        username = new String(username.getBytes("ISO8859-1")
                , "UTF-8");
        System.out.println(username);
    }
}
